<script>
	export default {
		
		onLaunch: function() {
			// 禁止浏览器缩放操作
			document.addEventListener('keydown', function(event) {
				if ((event.ctrlKey === true || event.metaKey === true) &&
					(event.which === 61 || event.which === 107 ||
						event.which === 173 || event.which === 109 ||
						event.which === 187 || event.which === 189)) {
					event.preventDefault()
				}
			}, false)
			// Chrome IE 360
			window.addEventListener('mousewheel', function(event) {
				if (event.ctrlKey === true || event.metaKey) {
					event.preventDefault()
				}
			}, {
				passive: false
			})
			// firefox
			window.addEventListener('DOMMouseScroll', function(event) {
				if (event.ctrlKey === true || event.metaKey) {
					event.preventDefault()
				}
			}, {
				passive: false
			})
		},
		
		onShow: function() {
			// 自动登录
			if (uni.getStorageSync('token')) {
				this.$store.commit('setToken', uni.getStorageSync('token'));
				this.$store.commit('setUserInfo', uni.getStorageSync('userInfo'));
			}
			
		},
		onHide: function() {
			console.log('App Hide')
		}
	}

</script>

<style lang="scss">
	
	@import "lib/colorui/main.css";
	@import "lib/colorui/icon.css";
	@import "uview-ui/index.scss";
	
	uni-modal {
	  z-index: 999999 !important;
	}

	
	html {
		font-size: 100px;
		min-width: 1200px
	}
	
</style>
